import { configure, getLogger } from 'log4js';
//dateFile
configure({
  appenders: {
    default: { type: 'file', filename: 'logs/access.log', pattern: 'yyyy-MM-dd' },
    access: { type: 'file', filename: 'logs/access.log' },
    db: { type: 'file', filename: 'logs/db.log' },
  },
  categories: {
    default: { appenders: ['default'], level: 'info' },
    access: { appenders: ['access'], level: 'info' },
    db: { appenders: ['db'], level: 'info' },
  },
});
export const accessLogger = getLogger('access');
export const dbLogger = getLogger('db');
export const log = getLogger('default');
export default getLogger();
